home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / scpixmapcache.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-08-22  |  751 b   |  34 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7.  
  8. #ifndef SCPIXMAPCACHE_H
  9. #define SCPIXMAPCACHE_H
  10.  
  11. #include <QMap>
  12. #include <QPixmap>
  13.  
  14. template <typename T>
  15. class ScPixmapCache : public QMap<T, QPixmap*>
  16. {
  17. public:
  18.     ScPixmapCache() {};
  19.     ~ScPixmapCache();
  20. };
  21.  
  22. template <typename T>
  23. ScPixmapCache<T>::~ScPixmapCache()
  24. {
  25.     typename QMap<T, QPixmap*>::iterator it;
  26.     typename QMap<T, QPixmap*>::iterator itEnd;
  27.  
  28.     itEnd = this->end();
  29.     for (it = this->begin(); it != itEnd; it++)
  30.         delete (it.value());
  31. };
  32.  
  33. #endif
  34.